import request from '@/utils/request';

// 房间管理
export function listPartnerProd(data) {
  return request({
    url: '/park/partnerProd/list',
    method: 'get',
    data,
    isJson: false,
  });
}

//  查询餐厅每日菜单列表
export function listPartnerDailyMenu(data) {
  return request({
    url: '/park/partnerDailyMenu/list',
    method: 'get',
    data,
    isJson: false,
  });
}

//  查询餐厅
export function getPartnerShop() {
  return request({
    url: '/park/partnerShop/select',
    method: 'get',
  });
}

/**
 * 新增菜品留样记录
 * @param data
 */
export const addRestaurantDishRecord = (data) => {
  return request({
    url: '/park/restaurantDishRecord',
    method: 'post',
    data: data,
    isJson: true,
  });
};

// 查询消费记录
export const partnerDish = (data) => {
  return request({
    url: '/park/partnerDish/list',
    method: 'get',
    data,
    isJson: false,
  });
};

// 查询消费记录
export const getCardInfo = (mob) => {
  return request({
    url: '/park/partnerCard/getInfo',
    method: 'get',
    data: { mob },
    isJson: false,
  });
};

/**
 * 新增餐厅菜品点赞
 * @param data
 */
export const addPartnerProdPraise = (data) => {
  return request({
    url: '/park/partnerProdPraise',
    method: 'post',
    data: data,
    isJson: true,
  });
};

//  查询点赞排行
export function listWeekZan() {
  return request({
    url: '/park/partnerProdPraise/listWeek',
    method: 'get',
    isJson: false,
  });
}

//  查询点赞排行
export function bmiRecord(data) {
  return request({
    url: '/park/bmiRecord',
    method: 'post',
    data,
    isJson: true,
  });
}
